#include <stdio.h>
#include <stdlib.h>	/* exit() */
#include <pthread.h>
#include <sys/time.h>
//#include <time.h>

/*
 * 以分离状态创建的线程
 */



int makethread(void *(*fn)(void *), void * arg)
{
	int err;
	pthread_t tid;
	pthread_attr_t attr;

	err = pthread_attr_init(&attr);
	if (err != 0)
		return err;

	err = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
	if (err == 0)
		err = pthread_create(&tid, &attr, fn, arg);

	pthread_attr_destroy(&attr);

	return err;
}


int main(void)
{

	exit(0);
}


